#!/bin/bash
COLDPIG=$1
if [ "$COLDPIG" == "" ]; then
  COLDPIG=`pwd`
fi
if [ "$ROOTSYS" == "" ]; then
  echo "You need to set up \$ROOTSYS first!!!"
  return
fi

if [ ! -d $ROOTSYS ]; then
  echo "\$ROOTSYS is not directory."
  return
fi

export COLDPIG
export COLDPIG_TARGET=`root-config --arch`
export COLDPIG_COMPILE=""

export LD_LIBRARY_PATH="$COLDPIG/$COLDPIG_TARGET/lib:$LD_LIBRARY_PATH"
export PATH="$COLDPIG/$COLDPIG_TARGET/bin:$PATH"